package com.wjyf.reducing_bento.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券领取记录表
 * </p>
 *
 * @author wjyf
 * @since 2023-03-14 08:36:33
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tb_coupon_receive")
@ApiModel(value = "CouponReceiveBean对象", description = "优惠券领取记录表")
public class CouponReceiveBean extends Model<CouponReceiveBean> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自动增加ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户id")
    @TableField("u_id")
    private Long uId;

    @ApiModelProperty("优惠券编号")
    @TableField("coupon_id")
    private Long couponId;

    @ApiModelProperty("券额")
    @TableField("coupon_money")
    private BigDecimal couponMoney;

    @ApiModelProperty("领取时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("金额满")
    @TableField("full_money")
    private BigDecimal fullMoney;

    @ApiModelProperty("状态，1为已使用，0为已领取未使用，-1为已过期")
    @TableField("`status`")
    private Integer status;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
